<?php
require_once 'global.php';
//$_POST['username']="www";
//$_POST['passwd']="123456";
//$_POST['passwdagain']="123456";
//$_POST['phone']="13331341234";


//接收参数
$username=addslashes(trim($_POST['username']));
$passwd=addslashes($_POST['passwd']);
$passwdagain=addslashes($_POST['passwdagain']);
$tel=addslashes($_POST['tel']);

//检测输入的用户名密码以及手机号
check_username($username);
check_tel($tel);
check_passwd($passwd);
check_passwd($passwdagain);
check_passwd_isame($passwd, $passwdagain);


create($username,$passwd,$tel);

//echo to_json(ret_ok("login.html","注册成功"));

header("Location:../index.php");
